package com.hnatourism.club.common.helper.flight;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

import com.hnatourism.club.common.helper.json.JSONArray;
import com.hnatourism.club.common.helper.json.JSONObject;
import com.hnatourism.club.common.helper.json.parser.ParseException;
import com.hnatourism.club.common.helper.protocol.ResponseMessage;
import com.hnatourism.club.flight.web.vo.FlightAirport;
import com.hnatourism.club.flight.web.vo.FlightCacheVo;
import com.hnatourism.framework.utils.MapUtils;
/**
*解析缓存 wuyuhu
*/

public class SearchFlightCacheResponseMessage extends ResponseMessage {
	//城市MAP
	public static Map<String,FlightCacheVo> cityCache=new HashMap<String,FlightCacheVo>();
	//机场to城市Map
	public static Map<String,FlightCacheVo> flightCache=new HashMap<String,FlightCacheVo>();
	//所有机场
	public static List<FlightAirport> flightAirportListCache=new ArrayList<FlightAirport>();
	//所有城市
	public static List<FlightCacheVo> cityAllCache=new ArrayList<FlightCacheVo>();
	
	@Override
	protected void parseBody(JSONObject obj) throws ParseException {
		JSONArray cities = (JSONArray) obj.get("cities");
		if (cities != null) {
			extractFlightInfos(cities);
		}
	}
	private void extractFlightInfos(JSONArray cities) {
		FlightCacheVo flightCacheVo;
		for(int i=0;i<cities.size();i++){
			JSONObject info = (JSONObject) cities.get(i);
			flightCacheVo=new FlightCacheVo();
			flightCacheVo.setCode((String) info.get("code"));
			flightCacheVo.setHotcity((String) info.get("hotcity"));
			flightCacheVo.setName((String) info.get("name"));
			flightCacheVo.setPinyin((String) info.get("pinyin"));
			
			JSONArray airports = (JSONArray) info.get("airports");
			List<FlightAirport> flightAirportList=new ArrayList<FlightAirport>();
			FlightAirport flightAirport;
			for(int j=0;j<airports.size();j++){
				JSONObject portInfo = (JSONObject) airports.get(j);
				flightAirport=new FlightAirport();
				flightAirport.setCode((String) portInfo.get("apCode"));
				flightAirport.setName((String) portInfo.get("apLName"));
				flightAirport.setPinyin((String) portInfo.get("pinyin"));
				flightAirport.setCityName(flightCacheVo.getName());
				flightAirportList.add(flightAirport);
				//机票对城市缓存
				flightCache.put(flightAirport.getCode(), flightCacheVo);
				//机场缓存
				flightAirportList.add(flightAirport);
				flightAirportListCache.add(flightAirport);
			}
			flightCacheVo.setFlightAirportList(flightAirportList);
			//城市缓存
			cityCache.put(flightCacheVo.getCode(), flightCacheVo);
			//所有城市缓存
			cityAllCache.add(flightCacheVo);
		}
	
	}
	public void getFlightCache() {
		if(MapUtils.isEmpty(cityCache)){
			//定义发送请求的对象
			SearchFlightCacheRequestMessage searchFlightCacheRequestMessage=new SearchFlightCacheRequestMessage();
			//发送请求并获取json字符串resultStr
			String resultStr ="";
				try {
					resultStr = searchFlightCacheRequestMessage.excute();
				} catch (Exception e) {
					e.printStackTrace();
				}
			//定义解析json的对象
				SearchFlightCacheResponseMessage searchFlightCacheResponseMessage=new SearchFlightCacheResponseMessage();
				try {
					//resultStr="{\"result\": {\"resultCode\":\"\",\"message\":\"\"},\"version\":\"1\",\"airPortCount\":\"151\",\"cities\": [{\"name\":\"阿克苏地区\",\"code\":\"100000001976\",\"pinyin\":\"akesu\",\"hotcity\":\"0\",\"airports\":[{\"apCode\":\"AKU\",\"apName\":\"阿克苏\",\"apEName\":\"akesu\"}]},{\"name\":\"阿勒泰地区\",\"code\":\"100000001978\",\"pinyin\":\"aletai\",\"hotcity\":\"0\",\"airports\":[{\"apCode\":\"AAT\",\"apName\":\"阿勒泰\",\"apEName\":\"aletai\"}]},{\"name\":\"安康市\",\"code\":\"100000001876\",\"pinyin\":\"ankang\",\"hotcity\":\"0\",\"airports\":[{\"apCode\":\"AKA\",\"apName\":\"安康\",\"apEName\":\"ankang\"}]},{\"name\":\"安庆\",\"code\":\"100000001570\",\"pinyin\":\"anqing\",\"hotcity\":\"0\",\"airports\":[{\"apCode\":\"AQG\",\"apName\":\"安庆\",\"apEName\":\"anqing\"}]},{\"name\":\"鞍山市\",\"code\":\"100000001806\",\"pinyin\":\"anshan\",\"hotcity\":\"0\",\"airports\":[{\"apCode\":\"AOG\",\"apName\":\"鞍山\",\"apEName\":\"anshan\"}]},{\"name\":\"蚌埠\",\"code\":\"100000001571\",\"pinyin\":\"bangbu\",\"hotcity\":\"0\",\"airports\":[{\"apCode\":\"BFU\",\"apName\":\"蚌埠\",\"apEName\":\"bengbu\"}]},{\"name\":\"保山市\",\"code\":\"100000001994\",\"pinyin\":\"baoshan\",\"hotcity\":\"0\",\"airports\":[{\"apCode\":\"BSD\",\"apName\":\"保山\",\"apEName\":\"baoshan\"}]},{\"name\":\"包头市\",\"code\":\"100000001822\",\"pinyin\":\"baotou\",\"hotcity\":\"0\",\"airports\":[{\"apCode\":\"BAV\",\"apName\":\"包头\",\"apEName\":\"baotou\"}]},{\"name\":\"北海\",\"code\":\"100000001653\",\"pinyin\":\"beihai\",\"hotcity\":\"0\",\"airports\":[{\"apCode\":\"BHY\",\"apName\":\"北海\",\"apEName\":\"beihai\"}]},{\"name\":\"北京市\",\"code\":\"010\",\"pinyin\":\"beijingshi\",\"hotcity\":\"1\",\"airports\":[{\"apCode\":\"PEK\",\"apName\":\"北京首都\",\"apEName\":\"beijingshoudu\"},{\"apCode\":\"NAY\",\"apName\":\"北京南苑\",\"apEName\":\"beijingnanyuan\"}]},{\"name\":\"长春\",\"code\":\"100000001771\",\"pinyin\":\"changchun\",\"hotcity\":\"0\",\"airports\":[{\"apCode\":\"CGQ\",\"apName\":\"长春\",\"apEName\":\"changchun\"}]},{\"name\":\"常德市\",\"code\":\"100000001754\",\"pinyin\":\"changde\",\"hotcity\":\"0\",\"airports\":[{\"apCode\":\"CGD\",\"apName\":\"常德\",\"apEName\":\"changde\"}]},{\"name\":\"长沙市\",\"code\":\"100000001755\",\"pinyin\":\"changsha\",\"hotcity\":\"0\",\"airports\":[{\"apCode\":\"CSX\",\"apName\":\"长沙\",\"apEName\":\"changsha\"}]},{\"name\":\"长治市\",\"code\":\"100000001863\",\"pinyin\":\"changzhi\",\"hotcity\":\"0\",\"airports\":[{\"apCode\":\"CIH\",\"apName\":\"长治\",\"apEName\":\"zhangzhi\"}]},{\"name\":\"常州\",\"code\":\"100000001778\",\"pinyin\":\"changzhou\",\"hotcity\":\"0\",\"airports\":[{\"apCode\":\"CZX\",\"apName\":\"常州\",\"apEName\":\"changzhou\"}]},{\"name\":\"朝阳\",\"code\":\"100000001808\",\"pinyin\":\"chaoyang\",\"hotcity\":\"0\",\"airports\":[{\"apCode\":\"CHG\",\"apName\":\"朝阳\",\"apEName\":\"zhaoyang\"}]},{\"name\":\"成都市\",\"code\":\"100000001907\",\"pinyin\":\"chengdu\",\"hotcity\":\"0\",\"airports\":[{\"apCode\":\"CTU\",\"apName\":\"成都\",\"apEName\":\"chengdu\"}]},{\"name\":\"赤峰市\",\"code\":\"100000018486\",\"pinyin\":\"chifeng\",\"hotcity\":\"0\",\"airports\":[{\"apCode\":\"CIF\",\"apName\":\"赤峰\",\"apEName\":\"chifeng\"}]},{\"name\":\"重庆市\",\"code\":\"023\",\"pinyin\":\"chongqingshi\",\"hotcity\":\"0\",\"airports\":[{\"apCode\":\"CKG\",\"apName\":\"重庆\",\"apEName\":\"chongqing\"}]},{\"name\":\"大理市\",\"code\":\"100000001996\",\"pinyin\":\"dali\",\"hotcity\":\"0\",\"airports\":[{\"apCode\":\"DLU\",\"apName\":\"大理\",\"apEName\":\"dali\"}]},{\"name\":\"大连市\",\"code\":\"100000001809\",\"pinyin\":\"dalian\",\"hotcity\":\"0\",\"airports\":[{\"apCode\":\"DLC\",\"apName\":\"大连\",\"apEName\":\"dalian\"}]},{\"name\":\"丹东市\",\"code\":\"100000001810\",\"pinyin\":\"dandong\",\"hotcity\":\"0\",\"airports\":[{\"apCode\":\"DDG\",\"apName\":\"丹东\",\"apEName\":\"dandong\"}]},{\"name\":\"大庆\",\"code\":\"100000001723\",\"pinyin\":\"daqing\",\"hotcity\":\"0\",\"airports\":[{\"apCode\":\"DQA\",\"apName\":\"大庆\",\"apEName\":\"daqing\"}]},{\"name\":\"大同市\",\"code\":\"100000001864\",\"pinyin\":\"datong\",\"hotcity\":\"0\",\"airports\":[{\"apCode\":\"DAT\",\"apName\":\"大同\",\"apEName\":\"datong\"}]},{\"name\":\"达州\",\"code\":\"100000001908\",\"pinyin\":\"dazhou\",\"hotcity\":\"0\",\"airports\":[{\"apCode\":\"DAX\",\"apName\":\"达县\",\"apEName\":\"daxian\"}]},{\"name\":\"东营\",\"code\":\"100000001848\",\"pinyin\":\"dongying\",\"hotcity\":\"0\",\"airports\":[{\"apCode\":\"DOY\",\"apName\":\"东营\",\"apEName\":\"dongying\"}]},{\"name\":\"敦煌市\",\"code\":\"100000002103\",\"pinyin\":\"dunhuang\",\"hotcity\":\"0\",\"airports\":[{\"apCode\":\"DNH\",\"apName\":\"敦煌\",\"apEName\":\"dunhuang\"}]},{\"name\":\"鄂尔多斯市\",\"code\":\"100000018470\",\"pinyin\":\"eerduosi\",\"hotcity\":\"0\",\"airports\":[{\"apCode\":\"DSN\",\"apName\":\"鄂尔多斯\",\"apEName\":\"eerduosi\"}]},{\"name\":\"恩施\",\"code\":\"100000001738\",\"pinyin\":\"enshi\",\"hotcity\":\"0\",\"airports\":[{\"apCode\":\"ENH\",\"apName\":\"恩施\",\"apEName\":\"enshi\"}]},{\"name\":\"阜阳市\",\"code\":\"100000002138\",\"pinyin\":\"fuyangshi\",\"hotcity\":\"0\",\"airports\":[{\"apCode\":\"FUG\",\"apName\":\"阜阳\",\"apEName\":\"fuyang\"}]},{\"name\":\"富蕴县\",\"code\":\"100000018471\",\"pinyin\":\"fuyun\",\"hotcity\":\"0\",\"airports\":[{\"apCode\":\"FYN\",\"apName\":\"富蕴\",\"apEName\":\"fuyun\"}]},{\"name\":\"福州市\",\"code\":\"100000001607\",\"pinyin\":\"fuzhou\",\"hotcity\":\"0\",\"airports\":[{\"apCode\":\"FOC\",\"apName\":\"福州\",\"apEName\":\"fuzhou\"}]},{\"name\":\"赣州\",\"code\":\"100000001792\",\"pinyin\":\"ganzhou\",\"hotcity\":\"0\",\"airports\":[{\"apCode\":\"KOW\",\"apName\":\"赣州\",\"apEName\":\"ganzhou\"}]},{\"name\":\"格尔木市\",\"code\":\"100000001837\",\"pinyin\":\"geermu\",\"hotcity\":\"0\",\"airports\":[{\"apCode\":\"GOQ\",\"apName\":\"格尔木\",\"apEName\":\"geermu\"}]},{\"name\":\"广汉市\",\"code\":\"100000018464\",\"pinyin\":\"guanghan\",\"hotcity\":\"0\",\"airports\":[{\"apCode\":\"GHN\",\"apName\":\"广汉\",\"apEName\":\"guanghan\"}]},{\"name\":\"广州市\",\"code\":\"100000001634\",\"pinyin\":\"guangzhou\",\"hotcity\":\"1\",\"airports\":[{\"apCode\":\"CAN\",\"apName\":\"广州\",\"apEName\":\"guangzhou\"}]},{\"name\":\"桂林\",\"code\":\"100000001656\",\"pinyin\":\"guilin\",\"hotcity\":\"0\",\"airports\":[{\"apCode\":\"KWL\",\"apName\":\"桂林\",\"apEName\":\"guilin\"}]},{\"name\":\"贵阳\",\"code\":\"100000001668\",\"pinyin\":\"guiyang\",\"hotcity\":\"0\",\"airports\":[{\"apCode\":\"KWE\",\"apName\":\"贵阳\",\"apEName\":\"guiyang\"}]},{\"name\":\"哈尔滨市\",\"code\":\"100000001725\",\"pinyin\":\"haerbin\",\"hotcity\":\"0\",\"airports\":[{\"apCode\":\"HRB\",\"apName\":\"哈尔滨\",\"apEName\":\"haerbin\"}]},{\"name\":\"海口\",\"code\":\"100000001681\",\"pinyin\":\"haikou\",\"hotcity\":\"0\",\"airports\":[{\"apCode\":\"HAK\",\"apName\":\"海口\",\"apEName\":\"haikou\"}]},{\"name\":\"海拉尔\",\"code\":\"100000018465\",\"pinyin\":\"hailaer\",\"hotcity\":\"0\",\"airports\":[{\"apCode\":\"HLD\",\"apName\":\"海拉尔\",\"apEName\":\"hailaer\"}]},{\"name\":\"哈密地区\",\"code\":\"100000001982\",\"pinyin\":\"hami\",\"hotcity\":\"0\",\"airports\":[{\"apCode\":\"HMI\",\"apName\":\"哈密\",\"apEName\":\"hami\"}]},{\"name\":\"邯郸市\",\"code\":\"100000001697\",\"pinyin\":\"handan\",\"hotcity\":\"0\",\"airports\":[{\"apCode\":\"HDG\",\"apName\":\"邯郸\",\"apEName\":\"handan\"}]},{\"name\":\"杭州市\",\"code\":\"100000002010\",\"pinyin\":\"hangzhou\",\"hotcity\":\"1\",\"airports\":[{\"apCode\":\"HGH\",\"apName\":\"杭州\",\"apEName\":\"hangzhou\"}]},{\"name\":\"汉中\",\"code\":\"100000001878\",\"pinyin\":\"hanzhong\",\"hotcity\":\"0\",\"airports\":[{\"apCode\":\"HZG\",\"apName\":\"汉中\",\"apEName\":\"hanzhong\"}]},{\"name\":\"合肥市\",\"code\":\"100000001576\",\"pinyin\":\"hefei\",\"hotcity\":\"0\",\"airports\":[{\"apCode\":\"HFE\",\"apName\":\"合肥\",\"apEName\":\"hefei\"}]},{\"name\":\"黑河\",\"code\":\"100000001727\",\"pinyin\":\"heihe\",\"hotcity\":\"0\",\"airports\":[{\"apCode\":\"HEK\",\"apName\":\"黑河\",\"apEName\":\"heihe\"}]},{\"name\":\"衡阳\",\"code\":\"100000001757\",\"pinyin\":\"hengyang\",\"hotcity\":\"0\",\"airports\":[{\"apCode\":\"HNY\",\"apName\":\"衡阳\",\"apEName\":\"hengyang\"}]},{\"name\":\"和田地区\",\"code\":\"100000001983\",\"pinyin\":\"hetian\",\"hotcity\":\"0\",\"airports\":[{\"apCode\":\"HTN\",\"apName\":\"和田\",\"apEName\":\"hetian\"}]},{\"name\":\"黄山市\",\"code\":\"100000002152\",\"pinyin\":\"huangshanshi\",\"hotcity\":\"0\",\"airports\":[{\"apCode\":\"TXN\",\"apName\":\"黄山\",\"apEName\":\"huangshan\"}]},{\"name\":\"黄岩\",\"code\":\"100000018479\",\"pinyin\":\"huangyan\",\"hotcity\":\"0\",\"airports\":[{\"apCode\":\"HYN\",\"apName\":\"黄岩\",\"apEName\":\"huangyan\"}]},{\"name\":\"呼和浩特市\",\"code\":\"100000001825\",\"pinyin\":\"huhehaote\",\"hotcity\":\"0\",\"airports\":[{\"apCode\":\"HET\",\"apName\":\"呼和浩特\",\"apEName\":\"huhehaote\"}]},{\"name\":\"佳木斯\",\"code\":\"100000001729\",\"pinyin\":\"jiamusi\",\"hotcity\":\"0\",\"airports\":[{\"apCode\":\"JMU\",\"apName\":\"佳木斯\",\"apEName\":\"jiamusi\"}]},{\"name\":\"吉安\",\"code\":\"100000001793\",\"pinyin\":\"jian\",\"hotcity\":\"0\",\"airports\":[{\"apCode\":\"KNC\",\"apName\":\"吉安\",\"apEName\":\"jian\"}]},{\"name\":\"嘉峪关市\",\"code\":\"100000001620\",\"pinyin\":\"jiayuguan\",\"hotcity\":\"0\",\"airports\":[{\"apCode\":\"JGN\",\"apName\":\"嘉峪关\",\"apEName\":\"jiayuguan\"}]},{\"name\":\"吉林\",\"code\":\"100000001316\",\"pinyin\":\"jilin\",\"hotcity\":\"0\",\"airports\":[{\"apCode\":\"JIL\",\"apName\":\"吉林\",\"apEName\":\"jilin\"}]},{\"name\":\"济南市\",\"code\":\"100000001850\",\"pinyin\":\"jinan\",\"hotcity\":\"0\",\"airports\":[{\"apCode\":\"TNA\",\"apName\":\"济南\",\"apEName\":\"jinan\"}]},{\"name\":\"景德镇\",\"code\":\"100000001795\",\"pinyin\":\"jingdezhen\",\"hotcity\":\"0\",\"airports\":[{\"apCode\":\"JDZ\",\"apName\":\"景德镇\",\"apEName\":\"jingdezhen\"}]},{\"name\":\"景洪市\",\"code\":\"100000018483\",\"pinyin\":\"jinghong\",\"hotcity\":\"0\",\"airports\":[{\"apCode\":\"JHG\",\"apName\":\"景洪\",\"apEName\":\"jinghong\"}]},{\"name\":\"济宁\",\"code\":\"100000001851\",\"pinyin\":\"jining\",\"hotcity\":\"0\",\"airports\":[{\"apCode\":\"JNG\",\"apName\":\"济宁\",\"apEName\":\"jining\"}]},{\"name\":\"晋江市\",\"code\":\"100000018482\",\"pinyin\":\"jinjiang\",\"hotcity\":\"0\",\"airports\":[{\"apCode\":\"JJN\",\"apName\":\"晋江\",\"apEName\":\"jinjiang\"}]},{\"name\":\"锦州\",\"code\":\"100000001814\",\"pinyin\":\"jinzhou\",\"hotcity\":\"0\",\"airports\":[{\"apCode\":\"JNZ\",\"apName\":\"锦州\",\"apEName\":\"jinzhou\"}]},{\"name\":\"九江\",\"code\":\"100000001796\",\"pinyin\":\"jiujiang\",\"hotcity\":\"0\",\"airports\":[{\"apCode\":\"JIU\",\"apName\":\"九江\",\"apEName\":\"jiujiang\"}]},{\"name\":\"酒泉\",\"code\":\"100000001622\",\"pinyin\":\"jiuquan\",\"hotcity\":\"0\",\"airports\":[{\"apCode\":\"CHW\",\"apName\":\"酒泉\",\"apEName\":\"jiuquan\"}]},{\"name\":\"九寨沟\",\"code\":\"100000002159\",\"pinyin\":\"jiuzhaigou\",\"hotcity\":\"0\",\"airports\":[{\"apCode\":\"JZH\",\"apName\":\"九寨黄龙\",\"apEName\":\"jiuzhaihuanglong\"}]},{\"name\":\"喀什地区\",\"code\":\"100000001984\",\"pinyin\":\"kashi\",\"hotcity\":\"0\",\"airports\":[{\"apCode\":\"KHG\",\"apName\":\"喀什\",\"apEName\":\"kashi\"}]},{\"name\":\"克拉玛依市\",\"code\":\"100000001985\",\"pinyin\":\"kelamayi\",\"hotcity\":\"0\",\"airports\":[{\"apCode\":\"KRY\",\"apName\":\"克拉玛依\",\"apEName\":\"kelamayi\"}]},{\"name\":\"库车市\",\"code\":\"100000006385\",\"pinyin\":\"kuche\",\"hotcity\":\"0\",\"airports\":[{\"apCode\":\"KCA\",\"apName\":\"库车\",\"apEName\":\"kuche\"}]},{\"name\":\"库尔勒\",\"code\":\"100000002113\",\"pinyin\":\"kuerle\",\"hotcity\":\"0\",\"airports\":[{\"apCode\":\"KRL\",\"apName\":\"库尔勒\",\"apEName\":\"kuerle\"}]},{\"name\":\"昆明市\",\"code\":\"100000002000\",\"pinyin\":\"kunming\",\"hotcity\":\"1\",\"airports\":[{\"apCode\":\"KMG\",\"apName\":\"昆明\",\"apEName\":\"kunming\"}]},{\"name\":\"兰州市\",\"code\":\"100000001623\",\"pinyin\":\"lanzhou\",\"hotcity\":\"0\",\"airports\":[{\"apCode\":\"LHW\",\"apName\":\"兰州\",\"apEName\":\"lanzhou\"}]},{\"name\":\"拉萨市\",\"code\":\"100000001953\",\"pinyin\":\"lasa\",\"hotcity\":\"0\",\"airports\":[{\"apCode\":\"LXA\",\"apName\":\"拉萨\",\"apEName\":\"lasa\"}]},{\"name\":\"连云港市\",\"code\":\"100000001780\",\"pinyin\":\"lianyungang\",\"hotcity\":\"0\",\"airports\":[{\"apCode\":\"LYG\",\"apName\":\"连云港\",\"apEName\":\"lianyungang\"}]},{\"name\":\"丽江市\",\"code\":\"100000002001\",\"pinyin\":\"lijiang\",\"hotcity\":\"0\",\"airports\":[{\"apCode\":\"LJG\",\"apName\":\"丽江\",\"apEName\":\"lijiang\"}]},{\"name\":\"临沂\",\"code\":\"100000001854\",\"pinyin\":\"linyi\",\"hotcity\":\"0\",\"airports\":[{\"apCode\":\"LYI\",\"apName\":\"临沂\",\"apEName\":\"linyi\"}]},{\"name\":\"林芝\",\"code\":\"100000001954\",\"pinyin\":\"linzhi\",\"hotcity\":\"0\",\"airports\":[{\"apCode\":\"LZY\",\"apName\":\"林芝\",\"apEName\":\"linzhi\"}]},{\"name\":\"柳州\",\"code\":\"100000001661\",\"pinyin\":\"liuzhou\",\"hotcity\":\"0\",\"airports\":[{\"apCode\":\"LZH\",\"apName\":\"柳州\",\"apEName\":\"liuzhou\"}]},{\"name\":\"洛阳市\",\"code\":\"100000001710\",\"pinyin\":\"luoyang\",\"hotcity\":\"0\",\"airports\":[{\"apCode\":\"LYA\",\"apName\":\"洛阳\",\"apEName\":\"luoyang\"}]},{\"name\":\"泸州\",\"code\":\"100000001925\",\"pinyin\":\"luzhou\",\"hotcity\":\"0\",\"airports\":[{\"apCode\":\"LZO\",\"apName\":\"泸州\",\"apEName\":\"luzhou\"}]},{\"name\":\"芒市\",\"code\":\"100000018478\",\"pinyin\":\"mangshi\",\"hotcity\":\"0\",\"airports\":[{\"apCode\":\"LUM\",\"apName\":\"芒市\",\"apEName\":\"mangshi\"}]},{\"name\":\"满洲里市\",\"code\":\"100000018476\",\"pinyin\":\"manzhouli\",\"hotcity\":\"0\",\"airports\":[{\"apCode\":\"NZH\",\"apName\":\"满洲里\",\"apEName\":\"manzhouli\"}]},{\"name\":\"梅县\",\"code\":\"100000018477\",\"pinyin\":\"meixian\",\"hotcity\":\"0\",\"airports\":[{\"apCode\":\"MXZ\",\"apName\":\"梅县\",\"apEName\":\"meixian\"}]},{\"name\":\"绵阳市\",\"code\":\"100000001916\",\"pinyin\":\"mianyang\",\"hotcity\":\"0\",\"airports\":[{\"apCode\":\"MIG\",\"apName\":\"绵阳\",\"apEName\":\"mianyang\"}]},{\"name\":\"牡丹江市\",\"code\":\"100000001730\",\"pinyin\":\"mudanjiang\",\"hotcity\":\"0\",\"airports\":[{\"apCode\":\"MDG\",\"apName\":\"牡丹江\",\"apEName\":\"mudanjiang\"}]},{\"name\":\"南昌\",\"code\":\"100000001798\",\"pinyin\":\"nanchang\",\"hotcity\":\"0\",\"airports\":[{\"apCode\":\"KHN\",\"apName\":\"南昌\",\"apEName\":\"nanchang\"}]},{\"name\":\"南充\",\"code\":\"100000001917\",\"pinyin\":\"nanchong\",\"hotcity\":\"0\",\"airports\":[{\"apCode\":\"NAO\",\"apName\":\"南充\",\"apEName\":\"nanchong\"}]},{\"name\":\"南京市\",\"code\":\"100000001781\",\"pinyin\":\"nanjing\",\"hotcity\":\"0\",\"airports\":[{\"apCode\":\"NKG\",\"apName\":\"南京\",\"apEName\":\"nanjing\"}]},{\"name\":\"南宁市\",\"code\":\"100000001662\",\"pinyin\":\"nanning\",\"hotcity\":\"0\",\"airports\":[{\"apCode\":\"NNG\",\"apName\":\"南宁\",\"apEName\":\"nanning\"}]},{\"name\":\"南通市\",\"code\":\"100000001782\",\"pinyin\":\"nantong\",\"hotcity\":\"0\",\"airports\":[{\"apCode\":\"NTG\",\"apName\":\"南通\",\"apEName\":\"nantong\"}]},{\"name\":\"南阳市\",\"code\":\"100000001711\",\"pinyin\":\"nanyang\",\"hotcity\":\"0\",\"airports\":[{\"apCode\":\"NNY\",\"apName\":\"南阳\",\"apEName\":\"nanyang\"}]},{\"name\":\"宁波市\",\"code\":\"100000002015\",\"pinyin\":\"ningbo\",\"hotcity\":\"0\",\"airports\":[{\"apCode\":\"NGB\",\"apName\":\"宁波\",\"apEName\":\"ningbo\"}]},{\"name\":\"攀枝花\",\"code\":\"100000001919\",\"pinyin\":\"panzhihua\",\"hotcity\":\"0\",\"airports\":[{\"apCode\":\"PZI\",\"apName\":\"攀枝花\",\"apEName\":\"panzhihua\"}]},{\"name\":\"且末县\",\"code\":\"100000018481\",\"pinyin\":\"qiemo\",\"hotcity\":\"0\",\"airports\":[{\"apCode\":\"IQM\",\"apName\":\"且末\",\"apEName\":\"qiemo\"}]},{\"name\":\"青岛市\",\"code\":\"100000001855\",\"pinyin\":\"qingdao\",\"hotcity\":\"0\",\"airports\":[{\"apCode\":\"TAO\",\"apName\":\"青岛\",\"apEName\":\"qingdao\"}]},{\"name\":\"庆阳\",\"code\":\"100000001627\",\"pinyin\":\"qingyang\",\"hotcity\":\"0\",\"airports\":[{\"apCode\":\"IQN\",\"apName\":\"庆阳\",\"apEName\":\"qingyang\"}]},{\"name\":\"秦皇岛市\",\"code\":\"100000001700\",\"pinyin\":\"qinhuangdao\",\"hotcity\":\"0\",\"airports\":[{\"apCode\":\"SHP\",\"apName\":\"秦皇岛\",\"apEName\":\"qinhuangdao\"}]},{\"name\":\"齐齐哈尔市\",\"code\":\"100000001732\",\"pinyin\":\"qiqihaer\",\"hotcity\":\"0\",\"airports\":[{\"apCode\":\"NDG\",\"apName\":\"齐齐哈尔\",\"apEName\":\"qiqihaer\"}]},{\"name\":\"衢州\",\"code\":\"100000002021\",\"pinyin\":\"quzhou\",\"hotcity\":\"0\",\"airports\":[{\"apCode\":\"JUZ\",\"apName\":\"衢州\",\"apEName\":\"quzhou\"}]},{\"name\":\"三亚\",\"code\":\"100000018462\",\"pinyin\":\"sanya\",\"hotcity\":\"0\",\"airports\":[{\"apCode\":\"SYX\",\"apName\":\"三亚\",\"apEName\":\"sanya\"}]},{\"name\":\"上海市\",\"code\":\"100000002194\",\"pinyin\":\"shanghaishiqu\",\"hotcity\":\"1\",\"airports\":[{\"apCode\":\"PVG\",\"apName\":\"上海浦东\",\"apEName\":\"shanghaipudong\"},{\"apCode\":\"SHA\",\"apName\":\"上海虹桥\",\"apEName\":\"shanghaihongqiao\"}]},{\"name\":\"汕头市\",\"code\":\"100000001642\",\"pinyin\":\"shantou\",\"hotcity\":\"0\",\"airports\":[{\"apCode\":\"SWA\",\"apName\":\"汕头\",\"apEName\":\"shantou\"}]},{\"name\":\"沙市区\",\"code\":\"100000018475\",\"pinyin\":\"shashi\",\"hotcity\":\"0\",\"airports\":[{\"apCode\":\"SHS\",\"apName\":\"沙市\",\"apEName\":\"shashi\"}]},{\"name\":\"沈阳市\",\"code\":\"100000001817\",\"pinyin\":\"shenyang\",\"hotcity\":\"0\",\"airports\":[{\"apCode\":\"SHE\",\"apName\":\"沈阳\",\"apEName\":\"shenyang\"}]},{\"name\":\"深圳市\",\"code\":\"100000001645\",\"pinyin\":\"shenzhen\",\"hotcity\":\"1\",\"airports\":[{\"apCode\":\"SZX\",\"apName\":\"深圳\",\"apEName\":\"shenzhen\"}]},{\"name\":\"石家庄\",\"code\":\"100000001701\",\"pinyin\":\"shijiazhuang\",\"hotcity\":\"0\",\"airports\":[{\"apCode\":\"SJW\",\"apName\":\"石家庄\",\"apEName\":\"shijiazhuang\"}]},{\"name\":\"普洱\",\"code\":\"100000002005\",\"pinyin\":\"simao\",\"hotcity\":\"0\",\"airports\":[{\"apCode\":\"SYM\",\"apName\":\"普洱\",\"apEName\":\"puer \"}]},{\"name\":\"苏州市\",\"code\":\"100000001783\",\"pinyin\":\"suzhou\",\"hotcity\":\"0\",\"airports\":[{\"apCode\":\"SZV\",\"apName\":\"苏州\",\"apEName\":\"suzhou\"}]},{\"name\":\"塔城地区\",\"code\":\"100000018472\",\"pinyin\":\"tacheng\",\"hotcity\":\"0\",\"airports\":[{\"apCode\":\"TCG\",\"apName\":\"塔城\",\"apEName\":\"tacheng\"}]},{\"name\":\"太原市\",\"code\":\"100000001871\",\"pinyin\":\"taiyuan\",\"hotcity\":\"0\",\"airports\":[{\"apCode\":\"TYN\",\"apName\":\"太原\",\"apEName\":\"taiyuan\"}]},{\"name\":\"腾冲\",\"code\":\"100000018513\",\"pinyin\":\"tengchong\",\"hotcity\":\"0\",\"airports\":[{\"apCode\":\"TCZ\",\"apName\":\"腾冲\",\"apEName\":\"tengcong\"}]},{\"name\":\"天津市\",\"code\":\"022\",\"pinyin\":\"tianjingshi\",\"hotcity\":\"0\",\"airports\":[{\"apCode\":\"TSN\",\"apName\":\"天津\",\"apEName\":\"tianjin\"}]},{\"name\":\"通辽\",\"code\":\"100000001827\",\"pinyin\":\"tongliao\",\"hotcity\":\"0\",\"airports\":[{\"apCode\":\"TGO\",\"apName\":\"通辽\",\"apEName\":\"tongliao\"}]},{\"name\":\"铜仁市\",\"code\":\"100000001673\",\"pinyin\":\"tongren\",\"hotcity\":\"0\",\"airports\":[{\"apCode\":\"TEN\",\"apName\":\"铜仁\",\"apEName\":\"tongren\"}]},{\"name\":\"万县\",\"code\":\"100000018484\",\"pinyin\":\"wanxian\",\"hotcity\":\"0\",\"airports\":[{\"apCode\":\"WXN\",\"apName\":\"万县\",\"apEName\":\"wanxian\"}]},{\"name\":\"潍坊市\",\"code\":\"100000001859\",\"pinyin\":\"weifang\",\"hotcity\":\"0\",\"airports\":[{\"apCode\":\"WEF\",\"apName\":\"潍坊\",\"apEName\":\"weifang\"}]},{\"name\":\"威海\",\"code\":\"100000001858\",\"pinyin\":\"weihai\",\"hotcity\":\"0\",\"airports\":[{\"apCode\":\"WEH\",\"apName\":\"威海\",\"apEName\":\"weihai\"}]},{\"name\":\"温州市\",\"code\":\"100000002019\",\"pinyin\":\"wenzhou\",\"hotcity\":\"0\",\"airports\":[{\"apCode\":\"WNZ\",\"apName\":\"温州\",\"apEName\":\"wenzhou\"}]},{\"name\":\"武汉市\",\"code\":\"100000001748\",\"pinyin\":\"wuhan\",\"hotcity\":\"0\",\"airports\":[{\"apCode\":\"WUH\",\"apName\":\"武汉天河\",\"apEName\":\"wuhantianhe\"},{\"apCode\":\"WJD\",\"apName\":\"武汉王家墩\",\"apEName\":\"wuhanwangjiadun\"}]},{\"name\":\"乌兰浩特市\",\"code\":\"100000018467\",\"pinyin\":\"wulanhaote\",\"hotcity\":\"0\",\"airports\":[{\"apCode\":\"HLH\",\"apName\":\"乌兰浩特\",\"apEName\":\"wulanhaote\"}]},{\"name\":\"乌鲁木齐市\",\"code\":\"100000001991\",\"pinyin\":\"wulumuqi\",\"hotcity\":\"0\",\"airports\":[{\"apCode\":\"URC\",\"apName\":\"乌鲁木齐\",\"apEName\":\"wulumuqi\"}]},{\"name\":\"无锡市\",\"code\":\"100000001786\",\"pinyin\":\"wuxi\",\"hotcity\":\"0\",\"airports\":[{\"apCode\":\"WUX\",\"apName\":\"无锡\",\"apEName\":\"wuxi\"}]},{\"name\":\"武夷山市\",\"code\":\"100000018485\",\"pinyin\":\"wuyishan\",\"hotcity\":\"0\",\"airports\":[{\"apCode\":\"WUS\",\"apName\":\"武夷山\",\"apEName\":\"wuyishan\"}]},{\"name\":\"梧州\",\"code\":\"100000001664\",\"pinyin\":\"wuzhou\",\"hotcity\":\"0\",\"airports\":[{\"apCode\":\"WUZ\",\"apName\":\"梧州\",\"apEName\":\"wuzhou\"}]},{\"name\":\"厦门\",\"code\":\"100000001615\",\"pinyin\":\"xiamen\",\"hotcity\":\"0\",\"airports\":[{\"apCode\":\"XMN\",\"apName\":\"厦门\",\"apEName\":\"xiamen\"}]},{\"name\":\"西安市\",\"code\":\"100000001882\",\"pinyin\":\"xian\",\"hotcity\":\"0\",\"airports\":[{\"apCode\":\"XIY\",\"apName\":\"西安\",\"apEName\":\"xian\"}]},{\"name\":\"襄樊市\",\"code\":\"100000001751\",\"pinyin\":\"xiangfan\",\"hotcity\":\"0\",\"airports\":[{\"apCode\":\"XFN\",\"apName\":\"襄樊\",\"apEName\":\"xiangfan\"}]},{\"name\":\"西昌市\",\"code\":\"100000018469\",\"pinyin\":\"xichang\",\"hotcity\":\"0\",\"airports\":[{\"apCode\":\"XIC\",\"apName\":\"西昌\",\"apEName\":\"xichang\"}]},{\"name\":\"锡林浩特市\",\"code\":\"100000018466\",\"pinyin\":\"xilinhaote\",\"hotcity\":\"0\",\"airports\":[{\"apCode\":\"XIL\",\"apName\":\"锡林浩特\",\"apEName\":\"xilinhaote\"}]},{\"name\":\"西宁市\",\"code\":\"100000001844\",\"pinyin\":\"xining\",\"hotcity\":\"0\",\"airports\":[{\"apCode\":\"XNN\",\"apName\":\"西宁\",\"apEName\":\"xining\"}]},{\"name\":\"徐州\",\"code\":\"100000001787\",\"pinyin\":\"xuzhou\",\"hotcity\":\"0\",\"airports\":[{\"apCode\":\"XUZ\",\"apName\":\"徐州\",\"apEName\":\"xuzhou\"}]},{\"name\":\"延安市\",\"code\":\"100000001884\",\"pinyin\":\"yanan\",\"hotcity\":\"0\",\"airports\":[{\"apCode\":\"ENY\",\"apName\":\"延安\",\"apEName\":\"yanan\"}]},{\"name\":\"盐城\",\"code\":\"100000001788\",\"pinyin\":\"yancheng\",\"hotcity\":\"0\",\"airports\":[{\"apCode\":\"YNZ\",\"apName\":\"盐城\",\"apEName\":\"yancheng\"}]},{\"name\":\"延吉\",\"code\":\"100000018463\",\"pinyin\":\"yanji\",\"hotcity\":\"0\",\"airports\":[{\"apCode\":\"YNJ\",\"apName\":\"延吉\",\"apEName\":\"yanji\"}]},{\"name\":\"烟台市\",\"code\":\"100000001860\",\"pinyin\":\"yantai\",\"hotcity\":\"0\",\"airports\":[{\"apCode\":\"YNT\",\"apName\":\"烟台\",\"apEName\":\"yantai\"}]},{\"name\":\"宜宾市\",\"code\":\"100000001922\",\"pinyin\":\"yibin\",\"hotcity\":\"0\",\"airports\":[{\"apCode\":\"YBP\",\"apName\":\"宜宾\",\"apEName\":\"yibin\"}]},{\"name\":\"宜昌市\",\"code\":\"100000001753\",\"pinyin\":\"yichang\",\"hotcity\":\"0\",\"airports\":[{\"apCode\":\"YIH\",\"apName\":\"宜昌\",\"apEName\":\"yichang\"}]},{\"name\":\"银川\",\"code\":\"100000001835\",\"pinyin\":\"yinchuan\",\"hotcity\":\"0\",\"airports\":[{\"apCode\":\"INC\",\"apName\":\"银川\",\"apEName\":\"yinchuan\"}]},{\"name\":\"伊宁市\",\"code\":\"100000018474\",\"pinyin\":\"yining\",\"hotcity\":\"0\",\"airports\":[{\"apCode\":\"YIN\",\"apName\":\"伊宁\",\"apEName\":\"yining\"}]},{\"name\":\"义乌市\",\"code\":\"100000018473\",\"pinyin\":\"yiwu\",\"hotcity\":\"0\",\"airports\":[{\"apCode\":\"YIW\",\"apName\":\"义乌\",\"apEName\":\"yiwu\"}]},{\"name\":\"榆林市\",\"code\":\"100000001885\",\"pinyin\":\"yulin\",\"hotcity\":\"0\",\"airports\":[{\"apCode\":\"UYN\",\"apName\":\"榆林\",\"apEName\":\"yulin\"}]},{\"name\":\"运城市\",\"code\":\"100000001875\",\"pinyin\":\"yuncheng\",\"hotcity\":\"0\",\"airports\":[{\"apCode\":\"YCU\",\"apName\":\"运城\",\"apEName\":\"yuncheng\"}]},{\"name\":\"张家界市\",\"code\":\"100000001766\",\"pinyin\":\"zhangjiajie\",\"hotcity\":\"0\",\"airports\":[{\"apCode\":\"DYG\",\"apName\":\"张家界\",\"apEName\":\"zhangjiajie\"}]},{\"name\":\"湛江市\",\"code\":\"100000001648\",\"pinyin\":\"zhanjiang\",\"hotcity\":\"0\",\"airports\":[{\"apCode\":\"ZHA\",\"apName\":\"湛江\",\"apEName\":\"zhanjiang\"}]},{\"name\":\"昭通\",\"code\":\"100000002009\",\"pinyin\":\"zhaotong\",\"hotcity\":\"0\",\"airports\":[{\"apCode\":\"ZAT\",\"apName\":\"昭通\",\"apEName\":\"zhaotong\"}]},{\"name\":\"郑州\",\"code\":\"100000001718\",\"pinyin\":\"zhengzhou\",\"hotcity\":\"0\",\"airports\":[{\"apCode\":\"CGO\",\"apName\":\"郑州\",\"apEName\":\"zhengzhou\"}]},{\"name\":\"中甸\",\"code\":\"100000018468\",\"pinyin\":\"zhongdian\",\"hotcity\":\"0\",\"airports\":[{\"apCode\":\"DIG\",\"apName\":\"中甸\",\"apEName\":\"zhongdian\"}]},{\"name\":\"舟山\",\"code\":\"100000002020\",\"pinyin\":\"zhoushan\",\"hotcity\":\"0\",\"airports\":[{\"apCode\":\"HSN\",\"apName\":\"舟山\",\"apEName\":\"zhoushan\"}]},{\"name\":\"珠海市\",\"code\":\"100000001651\",\"pinyin\":\"zhuhai\",\"hotcity\":\"0\",\"airports\":[{\"apCode\":\"ZUH\",\"apName\":\"珠海\",\"apEName\":\"zhuhai\"}]}]}";
					searchFlightCacheResponseMessage.parseResponse(resultStr);
				} catch (Exception e) {
					e.printStackTrace();
				}
		}
	}
	public void setFlightCache(Map<String, FlightCacheVo> flightCache) {
		this.flightCache = flightCache;
	}
	public static List<FlightAirport> getFlightAirportListCache() {
		return flightAirportListCache;
	}
	public static void setFlightAirportListCache(
			List<FlightAirport> flightAirportListCache) {
		SearchFlightCacheResponseMessage.flightAirportListCache = flightAirportListCache;
	}
	public Map<String, FlightCacheVo> getCityCache() {
		return cityCache;
	}
	public void setCityCache(Map<String, FlightCacheVo> cityCache) {
		this.cityCache = cityCache;
	}
	public List<FlightCacheVo> getCityAllCache() {
		return cityAllCache;
	}
	public void setCityAllCache(List<FlightCacheVo> cityAllCache) {
		this.cityAllCache = cityAllCache;
	}
}
